
package me.zhengjie.repository;

import me.zhengjie.domain.AppDocFav;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

/**
* @website https://el-admin.vip
* @author IQW
* @date 2022-07-18
**/
public interface AppDocFavRepository extends JpaRepository<AppDocFav, Integer>, JpaSpecificationExecutor<AppDocFav> {

    @Modifying
    @Query(value = "delete from app_doc_fav where user_id = ?1 and doc_id = ?2 ",nativeQuery = true)
    void deleteOne(Integer userId,Integer docId);
}